package com.imooc.service.center;

import com.imooc.pojo.Orders;
import com.imooc.pojo.Users;
import com.imooc.pojo.bo.center.CenterUserBO;
import com.imooc.pojo.vo.OrderStatusCountsVO;
import com.imooc.utils.PagedGridResult;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

public interface MyOrdersService {

    /**
     * 个人中心查询订单
     * @param userId
     * @param ordersStatus
     * @param page
     * @param pageSize
     * @return
     */
    PagedGridResult queryMyOrders(String userId,Integer ordersStatus,
                                  Integer page,Integer pageSize);

    /**
     * 订单状态 --> 商家发货
     * @param orderId
     */
    void updateDeliverOrderStatus(String orderId);

    /**
     * 查询我的订单
     * @param orderId
     * @param userId
     * @return
     */
    Orders queryMyOrder(String orderId,String userId);

    /**
     * 更新订单状态 -> 确认收货
     * @param orderId
     * @return
     */
    boolean updateReceiveOrderStatus(String orderId);

    /**
     * 删除订单(逻辑删除)
     * @param userId
     * @param orderId
     * @return
     */
    boolean deleteReceiveOrderStatus(String userId,String orderId);


    /**
     * 查询用户订单数
     * @param userId
     */
    OrderStatusCountsVO getMyOrderStatusCounts(String userId);

    /**
     * 获得个人中心订单的动向分页
     * @param userId
     * @param page
     * @param pageSize
     * @return
     */
    PagedGridResult getMyOrderTrend(String userId,Integer page,Integer pageSize);

}
